From: Jim Blandy Date: Mon, 10 May 1993 00:15:58 +0000 (+0000) Subject: * dispextern.h (struct face): Add cached_index member. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96336 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=88fd275e697fe57fd686e4fedde7f879c943a04f;p=emacs.git * dispextern.h (struct face): Add cached_index member. * xfaces.c (get_cached_face): Use it to avoid unnecessary searches of face_vector. --- diff --git a/src/dispextern.h b/src/dispextern.h index a89e73120c9..6efe29de8e7 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -29,6 +29,13 @@ struct face /* If this is non-zero, it is a GC we can use without modification to represent this face. */ GC gc; + + /* If we have ever called get_cached_face on this face structure, + here is the index in face_vector of the face it returned. It + might not be valid any more, but it's a good place to start + looking; get_cached_face tries to use this to avoid searching + all of face_vector. */ + int cached_index; /* Pixel value for foreground color. */ int foreground;